#ifndef X11PICKER_H
#define X11PICKER_H

class QClipboard;

#include <QObject>
#include <QString>
#include <QTime>

class Picker : public QObject
{
    Q_OBJECT
  public:
    static Picker& instance();
    QString CurrentWindowsPath;
    QString getSelectedText();

  private:
    explicit Picker(QObject *parent = nullptr);
    QClipboard *clipboard;
    QString text;
    QTime lastTime;
    bool isPressed;

  signals:
    void wordsPicked(QString appName, QString content);

  public slots:
    void onButtonPressed();
    void onButtonReleased();
};



#endif // X11PICKER_H
